package com.zy.utils.data.auto

import com.zy.utils.data.Point

//Node移动逻辑类
//Node index  to (x,y)
data class AutoNodeStep(val list: List<AutoElement>)
data class Coordinate(val x: Int, val y: Int)//坐标

data class AutoAnimationNode(val point: Point, val coordinate: Coordinate)

abstract class AutoElement(val coordinate: Coordinate) {
    abstract fun findPoint(point: Point): Boolean
}

//根据Index查找Node
class AutoIndexElement(var index: Int, coordinate: Coordinate) : AutoElement(coordinate) {
    override fun findPoint(point: Point): Boolean {
        return point.index == index
    }

    override fun toString(): String {
        return "AutoVElement(index='$index' $coordinate)"
    }
}
